﻿using System.ComponentModel.DataAnnotations;
using System.Data.Linq.Mapping;

namespace SeaBattle.Domain.Entities
{
    [Table(Name = "Players")]
    public class Player
    {
        [ScaffoldColumn(false)]
        [Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.OnInsert)]
        public int Id { get; set; }
        [Column]
        public string Login { get; private set; }
        [Column]
        public decimal Balance { get; private set; }

        public Player() {}
        public Player(string login,decimal balance)
        {
            Login = login;
            Balance = balance;
        }    
    }
}
